package org.flashbrighton.as3bots.effects 
{
	import flash.display.Sprite;
	import flash.geom.Point;
	

	public class EffectsManager
	{
		private var _target:Sprite;
		
		
		public function EffectsManager(target:Sprite) 
		{
			_target = target;
		}
		
		
		public function addBotExplosion(pos:Point, colour:uint):void 
		{
			var explosion:Explosion = new Explosion(Math.random() * 50 + 50, colour);
			explosion.x = pos.x;
			explosion.y = pos.y;		
			_target.addChild(explosion);
		}
		
		public function addBombExplosion(pos:Point, colour:uint):void 
		{
			var explosion:Explosion = new Explosion(Math.random() * 20 + 40, colour);
			explosion.x = pos.x;
			explosion.y = pos.y;		
			_target.addChild(explosion);
		}
		
		public function addSpark(pos:Point, colour:uint):void 
		{
			var spark:Spark = new Spark(colour);			
			spark.x = pos.x;
			spark.y = pos.y;
			_target.addChild(spark);
		}
		
	}

}